package com.zmzncs.lmtc.module.park.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmzncs.lmtc.module.park.dao.ParkInfoDaoerDao;
import com.zmzncs.lmtc.module.park.pojo.park_info_daoer.ParkInfoDaoer;
import com.zmzncs.lmtc.module.park.service.ParkInfoDaoerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 道尔车场拓展表 服务实现类
 * </p>
 *
 * @author JD
 * @since 2021-02-02
 */
@Service
public class ParkInfoDaoerServiceImpl extends ServiceImpl<ParkInfoDaoerDao, ParkInfoDaoer> implements ParkInfoDaoerService {

    @Autowired
    ParkInfoDaoerDao parkInfoDaoerDao;

    @Override
    public ParkInfoDaoer getInfoByParkId(String parkId) {
        return parkInfoDaoerDao.getInfoByParkId(parkId);
    }

    @Override
    public void updateByParkId(ParkInfoDaoer parkInfoDaoer) {
        LambdaUpdateWrapper<ParkInfoDaoer> updateWrapper = new LambdaUpdateWrapper<>();
        updateWrapper.eq(ParkInfoDaoer::getParkId,parkInfoDaoer.getParkId());
        int update = parkInfoDaoerDao.update(parkInfoDaoer, updateWrapper);
    }
}
